<?php

class Block extends Eloquent {

  protected $softDelete = true;
  public static $rules      = array(
      'page_id'        => 'exists:pages,id|integer|required',
      'tempestuser_id' => 'exists:users,id|integer|required',
      'title'          => 'required|between:1,50',
      'x'              => 'required|integer|between:0,1750',
      'y'              => 'required|integer|between:0,1750',
  );

  public function links() {
    return $this->hasMany('Link');
  }

  public function page() {
    return $this->belongsTo('Page');
  }

}